<!DOCTYPE html>
<html lang=zh>
<head>
    <meta charset="utf-8">
    
    <title>让 Hexo 自动生成 Tag Cloud 标签云页面 | 夏红林</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="前言参看上篇 创建404页面 的文章，我们可以轻易地创建一个链接为 http://&amp;quot;主页&amp;quot;/tags/ 的页面，然后编辑对应 .md 文件设置样式。在此基础上，我们还需要在主题 layout 布局中添加代码，引入辅助函数，才能自动生成所需的标签云页面。下面简单介绍下实现过程。">
<meta property="og:type" content="article">
<meta property="og:title" content="让 Hexo 自动生成 Tag Cloud 标签云页面">
<meta property="og:url" content="http://xiahl.top/2015/10/25/hexo-tag-cloud/index.html">
<meta property="og:site_name" content="夏红林">
<meta property="og:description" content="前言参看上篇 创建404页面 的文章，我们可以轻易地创建一个链接为 http://&amp;quot;主页&amp;quot;/tags/ 的页面，然后编辑对应 .md 文件设置样式。在此基础上，我们还需要在主题 layout 布局中添加代码，引入辅助函数，才能自动生成所需的标签云页面。下面简单介绍下实现过程。">
<meta property="og:image" content="http://xiahl.top/resources/tag-cloud.png">
<meta property="og:updated_time" content="2016-06-27T12:26:52.240Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="让 Hexo 自动生成 Tag Cloud 标签云页面">
<meta name="twitter:description" content="前言参看上篇 创建404页面 的文章，我们可以轻易地创建一个链接为 http://&amp;quot;主页&amp;quot;/tags/ 的页面，然后编辑对应 .md 文件设置样式。在此基础上，我们还需要在主题 layout 布局中添加代码，引入辅助函数，才能自动生成所需的标签云页面。下面简单介绍下实现过程。">
<meta name="twitter:image" content="http://xiahl.top/resources/tag-cloud.png">
    

    

    

    <link rel="stylesheet" href="/icarus/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/icarus/vendor/open-sans/styles.css">
    <link rel="stylesheet" href="/icarus/vendor/source-code-pro/styles.css">

    <link rel="stylesheet" href="/icarus/css/style.css">

    <!-- jQuery -->
    <script src="//cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
    
    
        <link rel="stylesheet" href="/icarus/vendor/fancybox/jquery.fancybox.css">
    
    
    
    

</head>
<body>
    <div id="container">
        <header id="header">
    <div id="header-main" class="header-inner">
        <div class="outer">
            <a href="/icarus/" id="logo">
                <i class="logo"></i>
                <span class="site-title">夏红林</span>
            </a>
            <nav id="main-nav">
                
                    <a class="main-nav-link" href="/icarus/.">Home</a>
                
                    <a class="main-nav-link" href="/icarus/archives">Archives</a>
                
                    <a class="main-nav-link" href="/icarus/categories">Categories</a>
                
                    <a class="main-nav-link" href="/icarus/tags">Tags</a>
                
                    <a class="main-nav-link" href="/icarus/about">About</a>
                
                    <a class="main-nav-link" href="http://xiahl.top/">Theme</a>
                
            </nav>
            
                
                <nav id="sub-nav">
                    <div class="profile" id="profile-nav">
                        <a id="profile-anchor" href="javascript:;">
                            <img class="avatar" src="/icarus/css/images/avatar.png" />
                            <i class="fa fa-caret-down"></i>
                        </a>
                    </div>
                </nav>
            
            <div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/icarus/',
        CONTENT_URL: '/icarus/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/icarus/js/insight.js"></script>

</div>
        </div>
    </div>
    <div id="main-nav-mobile" class="header-sub header-inner">
        <table class="menu outer">
            <tr>
                
                    <td><a class="main-nav-link" href="/icarus/.">Home</a></td>
                
                    <td><a class="main-nav-link" href="/icarus/archives">Archives</a></td>
                
                    <td><a class="main-nav-link" href="/icarus/categories">Categories</a></td>
                
                    <td><a class="main-nav-link" href="/icarus/tags">Tags</a></td>
                
                    <td><a class="main-nav-link" href="/icarus/about">About</a></td>
                
                    <td><a class="main-nav-link" href="http://xiahl.top/">Theme</a></td>
                
                <td>
                    
    <div class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
    </div>

                </td>
            </tr>
        </table>
    </div>
</header>

        <div class="outer">
            
                

<aside id="profile">
    <div class="inner profile-inner">
        <div class="base-info profile-block">
            <img id="avatar" src="/icarus/css/images/avatar.png" />
            <h2 id="name">Tianxiamucun</h2>
            <h3 id="title">Web Developer &amp; Designer</h3>
            <span id="location"><i class="fa fa-map-marker"></i>Harbin, China</span>
            <a id="follow" target="_blank" href="https://github.com/Xiahl1990">关注我</a>
        </div>
        <div class="article-info profile-block">
            <div class="article-info-block">
                9
                <span>文章</span>
            </div>
            <div class="article-info-block">
                7
                <span>标签</span>
            </div>
        </div>
        
        <div class="profile-block social-links">
            <table>
                <tr>
                    
                    
                    <td>
                        <a href="https://github.com/Xiahl1990/hexo-theme-tianxiamucun" target="_blank" title="github" class=tooltip>
                            <i class="fa fa-github"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/icarus/" target="_blank" title="twitter" class=tooltip>
                            <i class="fa fa-twitter"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/icarus/" target="_blank" title="facebook" class=tooltip>
                            <i class="fa fa-facebook"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/icarus/" target="_blank" title="dribbble" class=tooltip>
                            <i class="fa fa-dribbble"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/icarus/" target="_blank" title="rss" class=tooltip>
                            <i class="fa fa-rss"></i>
                        </a>
                    </td>
                    
                </tr>
            </table>
        </div>
        
    </div>
</aside>

            
            <section id="main"><article id="post-hexo-tag-cloud" class="article article-type-post" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
        
            <header class="article-header">
                
    
        <h1 class="article-title" itemprop="name">
            让 Hexo 自动生成 Tag Cloud 标签云页面
        </h1>
    

                <div class="article-meta">
                    
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/icarus/2015/10/25/hexo-tag-cloud/">
            <time datetime="2015-10-25T04:08:49.000Z" itemprop="datePublished">2015-10-25</time>
        </a>
    </div>


                    
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a>
    </div>

                    
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/icarus/tags/Hexo/">Hexo</a>, <a class="tag-link" href="/icarus/tags/TagCloud/">TagCloud</a>
    </div>

                </div>
            </header>
        
        <div class="article-entry" itemprop="articleBody">
        
            
                <div id="toc" class="toc-article">
                <strong class="toc-title">文章目录</strong>
                    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#intro"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#匹配页面"><span class="toc-number">2.</span> <span class="toc-text">匹配页面</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#插入标签云"><span class="toc-number">3.</span> <span class="toc-text">插入标签云</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#自定义样式"><span class="toc-number">4.</span> <span class="toc-text">自定义样式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#参考资料"><span class="toc-number">5.</span> <span class="toc-text">参考资料</span></a></li></ol>
                </div>
            
            <p></p><h2 id="intro">前言</h2>参看上篇 <a href="/2015/10/16/hexo-404-page/">创建404页面</a> 的文章，我们可以轻易地创建一个链接为 <code>http://&quot;主页&quot;/tags/</code> 的页面，然后编辑对应 .md 文件设置样式。在此基础上，我们还需要在主题 layout 布局中添加代码，引入辅助函数，才能自动生成所需的标签云页面。下面简单介绍下实现过程。<p></p>
<a id="more"></a>
<p><img src="/resources/tag-cloud.png" alt="tag-cloud"></p>
<h2 id="匹配页面"><a href="#匹配页面" class="headerlink" title="匹配页面"></a>匹配页面</h2><p>在主题文章的 layout 中合适位置插入下列 if 语句，让代码只在标签云页面生效。</p>
<figure class="highlight actionscript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- page.path 表示不含根路径的页面网址。还有数种方式可以匹配页面，在此不赘述。 --&gt;</span><br><span class="line">&lt;% <span class="keyword">if</span> (page.path === <span class="string">"tags/index.html"</span>)&#123; %&gt;</span><br><span class="line">    &lt;引入 tags 页面的代码&gt;</span><br><span class="line">&lt;% &#125; %&gt;</span><br></pre></td></tr></table></figure>
<p>以主题 <a href="https://github.com/MOxFIVE/hexo-theme-yelee" title="简而不减 Hexo 双栏博客主题" target="_blank" rel="external">Yelee</a> 为例，须在 <code>/layout/_partial/article.ejs</code>, div <code>article-entry</code> 中插入代码。</p>
<figure class="highlight actionscript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">&lt;div <span class="class"><span class="keyword">class</span>="<span class="title">article</span>-<span class="title">entry</span>" <span class="title">itemprop</span>="<span class="title">articleBody</span>"&gt;</span><br><span class="line">    &lt;% <span class="title">if</span> (<span class="title">post</span>.<span class="title">excerpt</span> &amp;&amp; <span class="title">index</span>)</span>&#123; %&gt;</span><br><span class="line">        &lt;%- post.excerpt %&gt;</span><br><span class="line">    &lt;% &#125; <span class="keyword">else</span> &#123; %&gt;</span><br><span class="line">        &lt;% <span class="keyword">if</span> (page.path === <span class="string">"tags/index.html"</span>)&#123; %&gt;</span><br><span class="line">            &lt;引入 tags 页面的代码&gt;</span><br><span class="line">        &lt;% &#125; %&gt;</span><br><span class="line">        &lt;%- post.content %&gt;</span><br><span class="line">    &lt;% &#125; %&gt;</span><br><span class="line">&lt;/div&gt;</span><br></pre></td></tr></table></figure>
<h2 id="插入标签云"><a href="#插入标签云" class="headerlink" title="插入标签云"></a>插入标签云</h2><p>使用 Hexo 辅助函数 <code>&lt;%- tagcloud([tags], [options]) %&gt;</code> 插入标签云，参数详解请查看 <a href="https://hexo.io/zh-cn/docs/helpers.html#tagcloud" title="tagcloud: 插入标签云" target="_blank" rel="external">官方文档</a>。</p>
<figure class="highlight actionscript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&lt;%- tagcloud(&#123;</span><br><span class="line">    min_font: <span class="number">16</span>, </span><br><span class="line">    max_font: <span class="number">35</span>, </span><br><span class="line">    amount: <span class="number">999</span>, </span><br><span class="line">    color: <span class="literal">true</span>, </span><br><span class="line">    start_color: <span class="string">'gray'</span>, </span><br><span class="line">    end_color: <span class="string">'black'</span>,</span><br><span class="line">&#125;) %&gt;</span><br></pre></td></tr></table></figure>
<h2 id="自定义样式"><a href="#自定义样式" class="headerlink" title="自定义样式"></a>自定义样式</h2><p>审查元素，按需修改相关样式。下面是目前本博客 <a href="/tags">标签云页面</a> 所添加的代码，附上供参考。</p>
<figure class="highlight erb"><figcaption><span>/layout/_partial/article.ejs</span><a href="https://github.com/MOxFIVE/hexo-theme-yelee/commit/3a82bb65b325826b3f71cae10e39e5314ccb63cb" target="_blank" rel="external">tag cloud page</a></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"><span class="tag">&lt;<span class="name">%</span></span></span> if (page.path === "tags/index.html")&#123; <span class="xml"><span class="tag">%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span></span></span> list_categories(&#123;</span><br><span class="line">        depth: 1,</span><br><span class="line">    &#125;) <span class="xml"><span class="tag">%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"tags"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%-</span></span></span> tagcloud(&#123;</span><br><span class="line">            min_font: 16, </span><br><span class="line">            max_font: 35, </span><br><span class="line">            amount: 999, </span><br><span class="line">            color: true, </span><br><span class="line">            start_color: 'gray', </span><br><span class="line">            end_color: 'black',</span><br><span class="line">        &#125;) <span class="xml"><span class="tag">%&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span><br><span class="line">        <span class="selector-class">.category-list</span> <span class="selector-tag">li</span>&#123;</span><br><span class="line">            <span class="attribute">display</span>: inline-block;</span><br><span class="line">            <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">1em</span> .<span class="number">5em</span> <span class="number">0</span>;</span><br><span class="line">            <span class="attribute">padding</span>: <span class="number">4px</span>;</span><br><span class="line">            <span class="attribute">border</span>: <span class="number">1px</span> solid lightgray;</span><br><span class="line">            <span class="attribute">font-size</span>: <span class="number">1.2em</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.category-list</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">            <span class="attribute">color</span>: gray;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.category-list-item</span><span class="selector-pseudo">:hover</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">            <span class="attribute">color</span>: gray;</span><br><span class="line">            <span class="attribute">text-decoration</span>: none;</span><br><span class="line">            <span class="attribute">font-weight</span>: bold;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.category-list-count</span> &#123;</span><br><span class="line">            <span class="attribute">margin-left</span>: <span class="number">2px</span>;</span><br><span class="line">            <span class="attribute">font-size</span>: .<span class="number">9em</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.article-entry</span> <span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:before</span>&#123;</span><br><span class="line">            <span class="attribute">display</span>: none;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.article-inner</span>  &#123;</span><br><span class="line">            <span class="attribute">text-align</span>: center;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.tags</span> &#123;</span><br><span class="line">            <span class="attribute">max-width</span>: <span class="number">40em</span>;</span><br><span class="line">            <span class="attribute">margin</span>: <span class="number">2em</span> auto;</span><br><span class="line">            <span class="attribute">margin-top</span>: <span class="number">0em</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.tags</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">            <span class="attribute">margin-right</span>: <span class="number">1em</span>;</span><br><span class="line">            <span class="attribute">border-bottom</span>: <span class="number">1px</span> solid gray;</span><br><span class="line">            <span class="attribute">line-height</span>: <span class="number">65px</span>;</span><br><span class="line">            <span class="attribute">white-space</span>: nowrap;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="selector-class">.tags</span> <span class="selector-tag">a</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">            <span class="attribute">border-bottom</span>: <span class="number">2px</span> solid black;</span><br><span class="line">            <span class="attribute">font-style</span>: italic;</span><br><span class="line">            <span class="attribute">text-decoration</span>: none;</span><br><span class="line">        &#125;</span><br><span class="line">    </span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span> &#125; <span class="xml"><span class="tag">%&gt;</span></span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>知道怎么在特定页面中引入 Hexo 自带的函数和变量后，大家应该就可以比较自在地在文章中引入需要的内容了，标签列表，文章列表，文章地址，日期时间等都可以。</p>
</blockquote>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ol>
<li><strong><em>tagcloud: 插入标签云</em></strong> by <strong>Hexo</strong> on <code>2015</code>: <a href="https://hexo.io/zh-cn/docs/helpers.html#tagcloud" target="_blank" rel="external">https://hexo.io/zh-cn/docs/helpers.html#tagcloud</a></li>
<li><strong><em>变量使用</em></strong> by <strong>Hexo</strong> on <code>2015</code>: <a href="https://hexo.io/zh-cn/docs/variables.html" target="_blank" rel="external">https://hexo.io/zh-cn/docs/variables.html</a></li>
<li><strong><em>feat: tags cloud page 标签云页面</em></strong> by <strong>MOxFIVE</strong> on <code>2015/10/12</code>: <a href="https://github.com/MOxFIVE/hexo-theme-yelee/commit/3a82bb65b325826b3f71cae10e39e5314ccb63cb" target="_blank" rel="external">https://github.com/MOxFIVE/hexo-theme-yelee/commit/3a82bb65b325826b3f71cae10e39e5314ccb63cb</a></li>
<li><strong><em>统计分类及标签数</em></strong> by <strong>MOxFIVE</strong> on <code>2015/12/1</code>: <a href="https://github.com/MOxFIVE/hexo-theme-yelee/commit/56abe4226454571335a62120ab404792f274437f" target="_blank" rel="external">https://github.com/MOxFIVE/hexo-theme-yelee/commit/56abe4226454571335a62120ab404792f274437f</a></li>
</ol>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://xiahl.top/icarus/2015/10/25/hexo-tag-cloud/" data-id="ciq3woaxu000br4vq7wvq8pd9" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://xiahl.top/icarus/2015/10/25/hexo-tag-cloud/#comments" class="article-comment-link disqus-comment-count" data-disqus-url="http://xiahl.top/icarus/2015/10/25/hexo-tag-cloud/">评论</a>
    

        </footer>
    </div>
    
        
<nav id="article-nav">
    
        <a href="/icarus/2015/11/04/hexo-deployment/" id="article-nav-newer" class="article-nav-link-wrap">
            <strong class="article-nav-caption">上一篇</strong>
            <div class="article-nav-title">
                
                    将 Hexo 博客部署到 GitHub Pages
                
            </div>
        </a>
    
    
        <a href="/icarus/2015/10/16/hexo-404-page/" id="article-nav-older" class="article-nav-link-wrap">
            <strong class="article-nav-caption">下一篇</strong>
            <div class="article-nav-title">在 Hexo 中创建匹配主题的404页面</div>
        </a>
    
</nav>


    
</article>


    
    <section id="comments">
    
        
    <div id="disqus_thread">
        <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>

    
    </section>

</section>
            
                <aside id="sidebar">
   
        
    <div class="widget-wrap">
        <h3 class="widget-title">最新文章</h3>
        <div class="widget">
            <ul id="recent-post" class="">
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/icarus/2016/06/13/hexo-collapsible-toc/" class="thumbnail">
    
    
        <span style="background-image:url(/resources/feat.toc.gif)" alt="为 Hexo 添加可折叠的文章目录" class="thumbnail-image"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a></p>
                            <p class="item-title"><a href="/icarus/2016/06/13/hexo-collapsible-toc/" class="title">为 Hexo 添加可折叠的文章目录</a></p>
                            <p class="item-date"><time datetime="2016-06-13T12:06:30.000Z" itemprop="datePublished">2016-06-13</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/icarus/2016/05/31/hexo-local-search/" class="thumbnail">
    
    
        <span style="background-image:url(/resources/hexo-local-search.gif)" alt="让 Hexo 博客支持本地站内搜索" class="thumbnail-image"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a></p>
                            <p class="item-title"><a href="/icarus/2016/05/31/hexo-local-search/" class="title">让 Hexo 博客支持本地站内搜索</a></p>
                            <p class="item-date"><time datetime="2016-05-31T05:50:19.000Z" itemprop="datePublished">2016-05-31</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/icarus/2016/03/27/hexo-browsersync/" class="thumbnail">
    
    
        <span style="background-image:url(/resources/browsersync.gif)" alt="Hexo 页面自动刷新与移动端调试" class="thumbnail-image"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a></p>
                            <p class="item-title"><a href="/icarus/2016/03/27/hexo-browsersync/" class="title">Hexo 页面自动刷新与移动端调试</a></p>
                            <p class="item-date"><time datetime="2016-03-26T16:17:50.000Z" itemprop="datePublished">2016-03-27</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/icarus/2016/01/10/hexo-post-version-control/" class="thumbnail">
    
    
        <span style="background-image:url(/resources/version-control.png)" alt="关联 GitHub, 让 Hexo 支持查看文章更新历史" class="thumbnail-image"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a></p>
                            <p class="item-title"><a href="/icarus/2016/01/10/hexo-post-version-control/" class="title">关联 GitHub, 让 Hexo 支持查看文章更新历史</a></p>
                            <p class="item-date"><time datetime="2016-01-10T14:38:01.000Z" itemprop="datePublished">2016-01-10</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/icarus/2016/01/02/hexo-comments/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/icarus/categories/术业专攻/">术业专攻</a></p>
                            <p class="item-title"><a href="/icarus/2016/01/02/hexo-comments/" class="title">为 Hexo 主题添加评论模块 — Disqus, 多说, 友言</a></p>
                            <p class="item-date"><time datetime="2016-01-01T17:26:48.000Z" itemprop="datePublished">2016-01-02</time></p>
                        </div>
                    </li>
                
            </ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">分类</h3>
        <div class="widget">
            <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/icarus/categories/术业专攻/">术业专攻</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/icarus/categories/自用笔记/">自用笔记</a><span class="category-list-count">1</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/icarus/categories/自用笔记/术业专攻/">术业专攻</a><span class="category-list-count">1</span></li></ul></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">归档</h3>
        <div class="widget">
            <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2016/06/">六月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2016/05/">五月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2016/03/">三月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2016/01/">一月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2015/11/">十一月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/icarus/archives/2015/10/">十月 2015</a><span class="archive-list-count">2</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">标签</h3>
        <div class="widget">
            <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/Browsersync/">Browsersync</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/CSS/">CSS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/GitHub/">GitHub</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/Hexo/">Hexo</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/JavaScript/">JavaScript</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/TagCloud/">TagCloud</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/icarus/tags/jQuery/">jQuery</a><span class="tag-list-count">2</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">标签云</h3>
        <div class="widget tagcloud">
            <a href="/icarus/tags/Browsersync/" style="font-size: 10px;">Browsersync</a> <a href="/icarus/tags/CSS/" style="font-size: 10px;">CSS</a> <a href="/icarus/tags/GitHub/" style="font-size: 15px;">GitHub</a> <a href="/icarus/tags/Hexo/" style="font-size: 20px;">Hexo</a> <a href="/icarus/tags/JavaScript/" style="font-size: 10px;">JavaScript</a> <a href="/icarus/tags/TagCloud/" style="font-size: 10px;">TagCloud</a> <a href="/icarus/tags/jQuery/" style="font-size: 15px;">jQuery</a>
        </div>
    </div>

    
        
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">链接</h3>
        <div class="widget">
            <ul>
                
                    <li>
                        <a href="http://hexo.io">Hexo</a>
                    </li>
                
            </ul>
        </div>
    </div>


    
    <div id="toTop" class="fa fa-angle-up"></div>
</aside>
            
        </div>
        <footer id="footer">
    <div class="outer">
        <div id="footer-info" class="inner">
            &copy; 2016 夏红林<br>
            Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a>
        </div>
    </div>
</footer>
        
    
    <script>
    var disqus_shortname = 'xiahl';
    
    
    var disqus_url = 'http://xiahl.top/icarus/2015/10/25/hexo-tag-cloud/';
    
    (function() {
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
    </script>



    
        <script src="/icarus/vendor/fancybox/jquery.fancybox.pack.js"></script>
    


<!-- Custom Scripts -->
<script src="/icarus/js/main.js"></script>

    </div>
</body>
</html>